# -*- coding: utf-8 -*-

import wx
from utils.host import get_ip_address, get_hostname

class StatusBarDemo(wx.StatusBar):
    def __init__(self,parent):
        hostname = get_hostname()
        hostip = get_ip_address('eth0')
        wx.StatusBar.__init__(self, parent=parent, id=-1, style=0, name="statusbar")
        self.FieldsCount = 4
        self.SetStatusText(u"主机: %s" % hostname, 0)
        self.SetStatusText(u"IP: %s" % hostip, 1)
        self.SetStatusStyles([3, 3, 3, 3])
#        self.SetStatusBar(self.statusBar1)        